<?php

namespace App\Console;

use App\Supports\Delivery\AutoReceiver;
use Illuminate\Console\Scheduling\Schedule;
use App\Services\Statistics\HardCountRefresh;
use App\Services\GoldStormTimer\GoldStormTimer;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected $commands = [
        //
    ];

    protected function schedule(Schedule $schedule)
    {
	    $schedule->call(new HardCountRefresh())->everyFiveMinutes()->name('hard_count')->onOneServer();
	    //$schedule->call(new GoldStormTimer())->everyMinute()->name('storm_timer')->onOneServer();

    	$schedule->command('cc:init')->daily()->onOneServer();
        $schedule->command('cc:review-vip')->dailyAt('00:05')->onOneServer();
    	//$schedule->command('cc:withdraw-to-alipay')->dailyAt('10:00')->onOneServer();
        $schedule->command('cc:sync-user-cache')->dailyAt('00:30')->onOneServer();

        $schedule->command('cc:auto-plus-apple')->hourly()->onOneServer();
        $schedule->command('cc:auto-plus-two-apple')->hourly()->onOneServer();
        $schedule->command('cc:auto-plus-three-apple')->hourly()->onOneServer();
        $schedule->command('cc:auto-plus-tree')->hourly()->onOneServer();
        $schedule->command('cc:run-apple-produce')->hourly(30)->onOneServer();

        $schedule->command('cc:user-detect')->dailyAt('01:00')->onOneServer();

        $schedule->command('ls:divide-reward')->monthlyOn(20, '5:00');
        

    	//$schedule->call(new AutoReceiver())->dailyAt('7:00')->name('auto_receiver')->onOneServer();
    }

    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
